<?php
/**
 * Author: Hancock
 * Email: 84622365@qq.com
 * Date: 7/18/2016
 * Des: 系统管理员
 */
defined('INHkMvc') or exit('Access Invalid!');

class App_member_vip_levelModel extends AppModel
{    
    public function getMemberVipLevel($level){
        return $this->field('vip_tk_rate,fee,activity_title,activity_cost,activity_end_time,vip_name')->find(['level'=>$level]);   
    }
    public function getMemberVipLevelInfo(){
    	return $this->field('id,level vip_level,vip_tk_rate vip_rate,month service_time,annual_fee service_cost,activity_title,activity_cost,activity_end_time,vip_name')->select(['level'=>array('gt',1)]);
    }
    public function getMemberLevelFee($level){
        $data=$this->field('fee,vip_tk_rate')->find(['level'=>$level]);
        $fee=$data['fee']*$data['vip_tk_rate'];
        return $fee;
    }
}
